package com.zang.blogz.controller;

import com.zang.blogz.model.output.FriendLinkViewVO;
import com.zang.blogz.result.Result;
import com.zang.blogz.service.FriendLinkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 朵橙i
 * @since 2022-06-17
 */
@RestController
@RequestMapping("/blogz/friendLink")
@Api(tags = "友链模块")
public class FriendLinkController {

    @Autowired
    private FriendLinkService friendLinkService;

    @ApiOperation(value = "获得友链页所有信息", notes = "获得友链页所有信息")
    @GetMapping("/")
    public Result<List<FriendLinkViewVO>> getFriendLinkViewVos() {

        return Result.ok(friendLinkService.getFriendLinkViewVos());
    }


}
